package org.snackframework.core;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;

public class MethodMeta
{
	private String methodName;
	
	private Method method;
	
	private ParameterMeta[] params;

	private Annotation[] annotations;

	private int modifiers;
	
	private Class returnType;
	
	public Class getReturnType()
	{
		return returnType;
	}

	public void setReturnType(Class returnType)
	{
		this.returnType = returnType;
	}

	public int getModifiers()
	{
		return modifiers;
	}

	public void setModifiers(int modifiers)
	{
		this.modifiers = modifiers;
	}

	public String getMethodName()
	{
		return methodName;
	}

	public void setMethodName(String methodName)
	{
		this.methodName = methodName;
	}

	public ParameterMeta[] getParams()
	{
		return params;
	}

	public void setParams(ParameterMeta[] params)
	{
		this.params = params;
	}

	public Annotation[] getAnnotations()
	{
		return annotations;
	}

	public void setAnnotations(Annotation[] annotations)
	{
		this.annotations = annotations;
	}
	
	public boolean isAbstract()
	{
		boolean isAbstract=false;
		if(0x0!=(this.modifiers & Modifier.ABSTRACT))
		{
			isAbstract=true;
		}
		return isAbstract;
	}
	
	public boolean isPrivate()
	{
		boolean isPrivate=false;
		if(0x0!=(this.modifiers & Modifier.PRIVATE))
		{
			isPrivate=true;
		}
		return isPrivate;
	}
	
	public boolean isFinal()
	{
		boolean isFinal=false;
		if(0x0!=(this.modifiers & Modifier.FINAL))
		{
			isFinal=true;
		}
		return isFinal;
	}

	public Method getMethod()
	{
		return method;
	}

	public void setMethod(Method method)
	{
		this.method = method;
	}
}